package com.ui;


import com.config.Config_demo;
import com.dao.Dao;
import com.dao.impl.DaoImpl;
import com.service.UserService;
import com.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Client {

//    @Autowired
//    private UserService userService;


    public static void main(String[] args) {
//        ApplicationContext ac=new AnnotationConfigApplicationContext(Config_demo.class);
        ApplicationContext ac=new ClassPathXmlApplicationContext("bean.xml");
        UserService userService= (UserService) ac.getBean("userServiceImpl");
        userService.findAll();
    }
}
